/*
 * $Id: proc.h,v 1.1 2006-04-14 14:17:09 bacon Exp $
 */

#ifndef _XP_SYS_PROC_H_
#define _XP_SYS_PROC_H_

/* xp_pid_t */
#if XP_SIZEOF_PID_T == XP_SIZEOF_CHAR
typedef char xp_pid_t;
#elif XP_SIZEOF_PID_T == XP_SIZEOF_SHORT
typedef short xp_pid_t;
#elif XP_SIZEOF_PID_T == XP_SIZEOF_INT
typedef int xp_pid_t;
#elif XP_SIZEOF_PID_T == XP_SIZEOF_LONG
typedef long xp_pid_t;
#elif XP_SIZEOF_PID_T == XP_SIZEOF_LONG_LONG
typedef long long xp_pid_t;
#else
typedef int xp_pid_t; /* most of unices use int for pid */
#endif

enum
{
	XP_FORKPROC_DETACH = (1 << 0)
};

#ifdef __cplusplus
extern "C" {
#endif

xp_pid_t xp_forkproc (int opt);
int xp_killproc (xp_pid_t pid, int sig);

#ifdef __cplusplus
}
#endif

#endif
